//
//  LHAddImageCellModel.m
//  Loohoo
//
//  Created by 陈镇 on 2025/6/23.
//

#import "LHAddImageCellModel.h"
#import "LHSelectPhotoManager.h"


@interface LHAddImageCellModel ()

@property(nonatomic,assign) BOOL isUpload;
@end
@implementation LHAddImageCellModel



-(void)setSelectImage:(UIImage *)selectImage{
    _selectImage = selectImage;
    
    //有数据， 并且没上传，并且没有上传中
    if (_selectImage && !_isUpload && !self.selectImageURL) {
        [self uploadImage:_selectImage];
    }
}


-(void)uploadImage:(UIImage *)uploadImage{
    _isUpload = YES;
//    [LHSelectPhotoManager uploadImage:uploadImage dic:@"/store/product" block:^(NSArray<NSString *> * _Nonnull urls) {
//        
//        self.isUpload = NO;
//        if (urls.count > 0) {
//            
//            self.selectImageURL = urls[0];
//    
//        }
//        
//    }];
    
}

@end
